package com.nextgen.bean;

import java.util.Date;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import com.nextgen.helper.DateSerializer;

@Document(collection = "asin")
public class Asin {
	
	@Id
	private String id; // this id is specific to mongo DB
	
	private String asinId;
	private String asinName;
	private String asinDescription;
	private double asinPrice;
	private String asinDiscount;
	private String asinDiscountedPrice;
	private String asinDiscountLabel;
	private boolean isAsinAvailable;
	private boolean isAsinSold;
	private String asinCategory;
	private String asinSubCategory;
	private String asinImage;
	private String asinGroup;
	private String asinSellerName;
	private String asinSellerId;
	private String asinSizes;
	private Date asinUploadDate;
	private Date lastUpdated;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@JsonSerialize(using=DateSerializer.class)
	public Date getLastUpdated() {
		return lastUpdated;
	}
	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}
	public String getAsinId() {
		return asinId;
	}
	public void setAsinId(String asinId) {
		this.asinId = asinId;
	}
	public String getAsinName() {
		return asinName;
	}
	public void setAsinName(String asinName) {
		this.asinName = asinName;
	}
	public String getAsinDescription() {
		return asinDescription;
	}
	public void setAsinDescription(String asinDescription) {
		this.asinDescription = asinDescription;
	}
	public double getAsinPrice() {
		return asinPrice;
	}
	public void setAsinPrice(double asinPrice) {
		this.asinPrice = asinPrice;
	}
	public String getAsinDiscount() {
		return asinDiscount;
	}
	public void setAsinDiscount(String asinDiscount) {
		this.asinDiscount = asinDiscount;
	}
	public boolean isAsinAvailable() {
		return isAsinAvailable;
	}
	public void setAsinAvailable(boolean isAsinAvailable) {
		this.isAsinAvailable = isAsinAvailable;
	}
	public boolean isAsinSold() {
		return isAsinSold;
	}
	public void setAsinSold(boolean isAsinSold) {
		this.isAsinSold = isAsinSold;
	}
	public String getAsinCategory() {
		return asinCategory;
	}
	public void setAsinCategory(String asinCategory) {
		this.asinCategory = asinCategory;
	}
	public String getAsinImage() {
		return asinImage;
	}
	public void setAsinImage(String asinImage) {
		this.asinImage = asinImage;
	}
	public String getAsinSellerName() {
		return asinSellerName;
	}
	public void setAsinSellerName(String asinSellerName) {
		this.asinSellerName = asinSellerName;
	}
	public String getAsinSellerId() {
		return asinSellerId;
	}
	public void setAsinSellerId(String asinSellerId) {
		this.asinSellerId = asinSellerId;
	}	
	@JsonSerialize(using=DateSerializer.class)
	public Date getAsinUploadDate() {
		return asinUploadDate;
	}
	public void setAsinUploadDate(Date asinUploadDate) {
		this.asinUploadDate = asinUploadDate;
	}
		   
	public String getAsinDiscountedPrice() {
		return asinDiscountedPrice;
	}
	public void setAsinDiscountedPrice(String asinDiscountedPrice) {
		this.asinDiscountedPrice = asinDiscountedPrice;
	}
	public String getAsinDiscountLabel() {
		return asinDiscountLabel;
	}
	public void setAsinDiscountLabel(String asinDiscountLabel) {
		this.asinDiscountLabel = asinDiscountLabel;
	}
	public String getAsinSubCategory() {
		return asinSubCategory;
	}
	public void setAsinSubCategory(String asinSubCategory) {
		this.asinSubCategory = asinSubCategory;
	}
	public String getAsinGroup() {
		return asinGroup;
	}
	public void setAsinGroup(String asinGroup) {
		this.asinGroup = asinGroup;
	}
	public String getAsinSizes() {
		return asinSizes;
	}
	public void setAsinSizes(String asinSizes) {
		this.asinSizes = asinSizes;
	}
	@Override
	public String toString() {
		return "{" +
				"asinId=" + asinId + 
				", asinName=" + asinName  + 
				", asinDescription=" + asinDescription  + 
				", asinPrice=" + asinPrice  + 
				", asinDiscount=" + asinDiscount  +
				", asinDiscountedPrice=" + asinDiscountedPrice +
				", asinDiscountLabel=" + asinDiscountLabel +
				", isAsinAvailable=" + isAsinAvailable  +
				", isAsinSold=" + isAsinSold  +
				", asinCategory=" + asinCategory  +
				", asinSubCategory=" + asinSubCategory +
				", asinImage=" + asinImage  +
				", asinGroup=" + asinGroup +
				", asinSellerName=" + asinSellerName  +
				", asinSizes=" +asinSizes +
				", asinUploadDate=" + asinUploadDate  +
				"}";
	}
}
